<template>
  <div>

    <!-- topbar start-->
    <div class="topbar-area">
      <div class="container">
        <div class="text-center">
          <span>为什么读书</span>“你迷茫的原因在于读书太少而想的太多。”  ———— 杨绛
        </div>
      </div>
    </div>
    <!-- topbar end-->

    <!-- navbar start-->
    <div class="navbar-area">
      <div class="container">
        <div class="row">
          <div class="logo">
            <el-link
              :underline="false"
              @click="reloadIndex()"
            ><img src="@/assets/logo.jpg"></el-link>
          </div>
          <div class="adbar">
            <div class="adimg">
              <el-link
                title="广告图片"
                :underline="false"
                @click="reloadIndex()"
              ><img src="@/assets/ad.png"></el-link>
            </div>
          </div>
        </div>
      </div>
    </div>
    <!-- navbar end-->

  </div>
</template>

<script>
export default {
  inject: ['reload'],
  data() {
    return {

    }
  },
  methods: {
    reloadIndex() {
      this.$router.push({ path: '/' })
      // this.reload()
    }
  }
}
</script>

<style>
.container {
    width: 100%;
    max-width: 1140px;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
}
.row {
  display: flex;
  justify-content: space-between;
}
.topbar-area {
    background: #f7f7f7;
}
.text-center {
    color: #292929;
    font-family: 'Courier New', Courier, monospace;
    font-size: 16px;
}
.text-center span {
    display: inline-block;
    height: 60px;
    line-height: 60px;
    padding: 0 25px;
    margin-right: 16px;
    background: #52b788;
    color: #ffffff;
}
.navbar-area {
  padding-top: 30px;
  padding-bottom: 30px;
}
.navbar-area .logo {
  flex: 1;
  width: 100%;
  max-width: 33.333333%;
  margin-right: 0;
}
.navbar-area .logo img {
  max-width: 100%;
  vertical-align: middle;
  border-style: none;
}
.navbar-area .adbar {
  position: relative;
  flex: 2;
  max-width: 66.666666%;
  padding-right: 15px;
  padding-left: 15px;
}
.navbar-area .adbar .adimg {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}
.navbar-area {
  border-top: 1px solid #fafafa;
}
.navbar-area .adbar .adimg img {
  max-width: 100%;
  vertical-align: middle;
  border-style: none;
}
.menubar-area .mainMenu {
  position: relative;
  flex: 2;
  min-height: 60px;
  width: 100%;
}
.menubar-area .mainMenu ul {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
}
.menubar-area .mainMenu ul li {
  padding: 0 30px 0 20px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 16px;
}
.menubar-area .mainMenu .el-dropdown {
  font-family: 'Courier New', Courier, monospace;
  font-size: 16px;
  cursor: pointer;
}
.el-dropdown-menu__item:not(.is-disabled):hover,
.el-dropdown-menu__item:focus {
  background-color: #fff!important;
}
.menubar-area {
  margin-bottom: 30px;
}
.menubar-area .otherMenu {
  position: relative;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex: 1;
  width: 100%;
  min-height: 60px;
  line-height: 60px;
  max-width: 66.666666%;
}
.menubar-area .otherMenu i {
  cursor: pointer;
  padding: 0 10px 0 10px;
  font-size: 24px;
}
.menubar-area .otherMenu i:hover {
  color: #337AB7;
  transition: .3s;
}
.menubar-area .otherMenu .search {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding-left: 50px;
}
.menubar-area .otherMenu >>> .el-input__inner {
  width: 100%;
  border: none;
  border-radius: 0;
  border-bottom: 1px solid #DCDFE6;
}
.menubar-area .otherMenu >>> .el-input__inner:focus {
  border-color: #409EFF;
  outline: 0;
}
.menubar-area .otherMenu >>> .el-dropdown {
  font-family: 'Courier New', Courier, monospace;
  font-size: 16px;
}
</style>
